unit _FiltroContrato;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dxCore, dxButton, ExtCtrls, MMJPanel, Mask, JvExMask,
  JvToolEdit, JvExExtCtrls, JvBevel, StdCtrls, Buttons;

type
  Tf_FiltroContrato = class(TForm)
    MMJPanel1: TMMJPanel;
    btnFiltro: TdxButton;
    btnSair: TdxButton;
    MMJPanel2: TMMJPanel;
    dxButton1: TdxButton;
    lbl11: TLabel;
    btn1: TBitBtn;
    lbl12: TLabel;
    btn2: TBitBtn;
    lbl1: TLabel;
    btn3: TBitBtn;
    btn4: TBitBtn;
    lbl2: TLabel;
    lbl3: TLabel;
    edtProprietario: TEdit;
    cbb1: TComboBox;
    edt2: TEdit;
    edt3: TEdit;
    edt4: TEdit;
    JvBevel1: TJvBevel;
    lbl4: TLabel;
    lbl5: TLabel;
    JvDateEdit1: TJvDateEdit;
    JvDateEdit2: TJvDateEdit;
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  f_FiltroContrato: Tf_FiltroContrato;

implementation

uses UDm, uDmCitrus;

{$R *.dfm}

procedure Tf_FiltroContrato.btn1Click(Sender: TObject);
begin
  fProcurar:= TfProcurar.Create(self,dm.scds_forn_proc);
  try
    fProcurar.btnImprimir.Visible := true;
    fProcurar.RadioGroup1.Visible := true;
    dm.scds_forn_proc.Params.ParamByName('pStatus').AsInteger := 1;
    dm.scds_forn_proc.Params.ParamByName('pSegmento').AsInteger := 0;
    fProcurar.BtnProcurar.Click;
    fProcurar.EvDBFind1.DataField := 'NOMEFORNECEDOR';
    fProcurar.RadioGroup2.Visible := True;
    fProcurar.ShowModal;
    DM.ID_FORNECEDOR := dm.scds_forn_procCODFORNECEDOR.AsInteger;
    edtProprietario := dm.scds_forn_procNOMEFORNECEDOR.AsString;
  finally
    dm.scds_forn_proc.Close;
    fProcurar.Free;
  end;
end;

end.
